<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html lang="en">
<head>
  <title>货物出库登记</title>
  <meta charset="UTF-8">
  <script type="text/javascript" src="/Public/hdjs/jquery-1.11.3.min.js"></script>
    <link rel="stylesheet" href="/Public/hdjs/hdjs.css"/>
    <script type="text/javascript" src="/Public/hdjs/hdjs.min.js"></script>
  <link href="/Public/css/mine.css" type="text/css" rel="stylesheet" />
</head>
<body>
  <div class="div_head">
    <span>
      <span style="float: left;">当前位置是：仓库管理 >>货物出库登记</span>
    </span>
  </div>
  <div class="hd-w700" style="padding:20px;margin:0 auto">
    <form name="form1" method="post" action="/index.php/Wareroom/out_w/cid/13">
      <input type="hidden" name="gid" value="<?php echo ($info["g_id"]); ?>" />
      <input type="hidden" name="aid" value="2" />
      <input type="hidden" name="bid" value="<?php echo ($info["bid"]); ?>" />
      <input type="hidden" name="cid" value="<?php echo ($info["cid"]); ?>" />
      <table class="hd-table hd-table-form hd-form">
    <thead>
        <tr>
          <th colspan="2">货物出库登记</th>
        </tr>
    </thead>
        <tr>
          <td class="hd-w120 t_r">货物名称：</td>
          <td><?php echo ($info["g_name"]); ?></td>
        </tr>
        <tr>
          <td class="hd-w120 t_r">调出仓库：</td>
          <td><?php echo ($info["name"]); ?></td>
        </tr>
        <tr>
          <td class="hd-w120 t_r">货物单位：</td>
          <td><?php echo ($info["dw_name"]); ?></td>
        </tr>
        <tr>
          <td class="hd-w120 t_r">货物单个重量：</td>
          <td><?php echo ($info["g_zl"]); ?>kg</td>
        </tr>
        <tr>
          <td class="hd-w120 t_r">当前货物库存量：</td>
          <td><?php echo ($info["gcount"]); ?></td>
        </tr>
         <tr>
          <td class="hd-w120 t_r">货物出库登记数量：</td>
          <td><input name="gcount" type="text" class="hd-w200" /></td>
        </tr>
        <tr>
          <td class="hd-w120 t_r">出库原因：</td>
          <td>
             <select name="action" class="hd-w210">
              <?php if(is_array($action)): $i = 0; $__LIST__ = $action;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><option value="<?php echo ($v["a_id"]); ?>"><?php echo ($v["a_info"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
            </select>
          </td>
        </tr>
        <tr>
          <td class="hd-w120 t_r">登记人：</td>
          <td>【<?php echo (session('mg_name')); ?>】</td>
        </tr>
        <tr>
          <td colspan="2" align="center"><input type="submit" class="hd-btn hd-btn-default" value="提交"/></td>
        </tr>
      </table>
    </form>
  </div>
<!--表单验证Start-->
<script>
    $(function () {
        $('form').validate({
            gcount: {
                rule: {
                    required: true
                },
                error: {
                    required: '货物数量不能为空'
                },
                message: '请输入货物数量,若大于库存无法通过审核'
            },
            action: {
                rule: {
                    required: true
                },
                error: {
                    required: '出库原因不能为空'
                },
                message: '请输入出库原因'
            },
        })
    })
</script>
<!--表单验证End-->
    </body>
</html>